Naming conventions for Groovy services

   Exchange Pre-configured Maestro services.  |   Platform Developer  |  All versions   This feature is related to v5.1 and higher.

When developing code of any type it is beneficial to apply naming conventions to improve the consistency and maintainability of the software. The suggested naming conventions in this article have been developed based on our experience of what works best for Journey Manager Groovy services.

Service Naming

Service names should be succinct and consist of plain English that clearly describes the function being performed. Services that integrate external systems should be named using the vendor/product name followed by the function being performed with a hyphen in between. For example:

  • greenID - Identity Verification
  • FIS - Password Expiry Check
  • FIS QualiFile - Verification
  • ATO Super Fund Lookup - ABN Search
  • ATO Super Fund Lookup - Quick Search

When naming your Groovy services and associated service connections the words 'Service' and 'Connection' are redundant so omit these from the name. Similarly, there is no need to include the type of service in the service name (for example, 'DDS' for Dynamic Data Services)

Parameter Naming

When naming service parameters, request parameters, local variables and JSON data elements, always use camel case with a lower case first letter and capitals for the first letter of subsequent words (no hyphens, underscores or other special characters). For example:

  • clientName
  • gender
  • businessName
  • driversLicenseNumber
  • serviceResponse

Acronyms (with all capitals) should be treated as if they were a normal word. For example:

  • ufoLandingSite
  • applicantDob
  • licensedOrByo
  • nameOfCeo
  • favoriteNflTeam

Submission Property Naming

When writing submission properties relating to third-party service connectors, prefix the property name with the service name using dot notation like this: <service-name>.<property-name>. For example:

  • greenID.verifyStatus
  • QualiFile.transactionTrackingId